﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace SimplexEngine
{
    public abstract class MRTLightMaterial : Material
    {
        public MRTLightMaterial()
        {
            normal_texture.Create("MRT:NormalTexture", true);
        }

        protected override void OnApplyParameters(GameTime game_time, Int64 frame_number)
        {
            Effect.Parameters["LightDiffuse"].SetValue(diffuse.ToVector4());
            Effect.Parameters["NormalTexture"].SetValue(NormalTexture.Texture);
        }

        public MaterialTexture NormalTexture { get { return normal_texture; } }
        protected MaterialTexture normal_texture = new MaterialTexture();

        public Color Diffuse { get { return diffuse; } set { diffuse = value; } }
        protected Color diffuse = Color.White;
    }
}
